<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员首页</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }
        .header {
            background: rgba(255, 255, 255, 0.95);
            /* 去除backdrop-filter提升性能 */
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
            padding: 20px 0;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }
        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .header-title {
            font-size: 24px;
            font-weight: 600;
            color: #333;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .header-title::before {
            content: "\1F3E8";
            font-size: 28px;
        }
        .admin-info {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255, 255, 255, 0.8);
            padding: 10px 20px;
            border-radius: 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        .admin-avatar {
            width: 40px;
            height: 40px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 18px;
        }
        .admin-name {
            font-weight: 500;
            color: #333;
        }
        .main-content {
            max-width: 1200px;
            margin: 120px auto 40px;
            padding: 0 20px;
        }
        .welcome-section {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 40px;
            margin-bottom: 40px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
        }
        .welcome-title {
            font-size: 32px;
            font-weight: 700;
            color: #333;
            margin-bottom: 10px;
        }
        .welcome-subtitle {
            font-size: 18px;
            color: #666;
            margin-bottom: 30px;
        }
        /* 统一卡片容器，2行2列，gap一致 */
        .admin-card-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            gap: 40px 48px;
            max-width: 900px;
            margin: 0 auto 60px auto;
            justify-items: center;
            align-items: center;
        }
        .admin-card {
            width: 380px;
            height: 300px;
            background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
            border-radius: 28px;
            box-shadow: 0 8px 32px #b3a6e6;
            padding: 44px 28px 36px 28px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: box-shadow 0.2s, transform 0.2s;
            text-align: center;
        }
        .admin-card:hover {
            box-shadow: 0 16px 48px #a18cd1;
            transform: translateY(-8px) scale(1.04);
        }
        .admin-card-icon {
            font-size: 54px;
            margin-bottom: 22px;
        }
        .admin-card-title {
            font-size: 26px;
            font-weight: 800;
            color: #5a3ec8;
            margin-bottom: 14px;
            letter-spacing: 1px;
        }
        .admin-card-desc {
            color: #fff;
            font-size: 18px;
            line-height: 1.7;
            font-weight: 400;
        }
        .admin-action-btn {
            background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
            border: none;
            color: #fff;
            padding: 8px 28px;
            border-radius: 22px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(118, 75, 162, 0.12);
            transition: background 0.25s, box-shadow 0.25s, transform 0.15s;
            outline: none;
            margin-left: 8px;
        }
        .admin-action-btn:hover {
            background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%);
            color: #5a3ec8;
            box-shadow: 0 6px 18px #a18cd1;
            transform: translateY(-2px) scale(1.04);
        }
        /* 响应式优化 */
        @media (max-width: 1000px) {
            .welcome-section, .admin-card-list {
                max-width: 98vw;
        }
            .admin-card-list {
                gap: 24px;
            }
        }
        @media (max-width: 950px) {
            .admin-card-list {
                max-width: 98vw;
                gap: 24px 12px;
            }
            .admin-card {
                width: 90vw;
                min-width: 0;
                max-width: 98vw;
                height: auto;
                padding: 28px 8px 20px 8px;
            }
        }
        @media (max-width: 700px) {
            .admin-card-list {
                grid-template-columns: 1fr;
                grid-template-rows: repeat(4, 1fr);
                gap: 24px;
            }
            .admin-card {
                width: 98vw;
                max-width: 98vw;
        }
        }
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
            }
            .welcome-title {
                font-size: 24px;
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="header-content">
            <div class="header-title">酒店管理系统</div>
            <div class="admin-info">
                <div class="admin-avatar">A</div>
                <div class="admin-name">管理员：<span id="adminName">管理员</span></div>
                <button id="logoutBtn" class="admin-action-btn">退出登录</button>
            </div>
        </div>
    </div>
    <div class="main-content">
        <div class="welcome-section">
            <h1 class="welcome-title">欢迎回来！</h1>
            <p class="welcome-subtitle">欢迎您登录酒店管理系统，您可以在下方选择需要办理的业务：办理入住、办理退房、管理会员、管理订单等。请根据实际需求点击相应功能卡片，系统将为您提供高效、便捷的管理体验。祝您工作顺利，心情愉快！</p>
        </div>
        <div class="admin-card-list">
            <div class="admin-card" onclick="window.location.href='checkin.html'">
                <div class="admin-card-icon">🏠</div>
                <div class="admin-card-title">办理入住</div>
                <div class="admin-card-desc">为客人办理入住手续，分配房间，录入身份信息</div>
            </div>
            <div class="admin-card" onclick="window.location.href='checkout.html'">
                <div class="admin-card-icon">🚪</div>
                <div class="admin-card-title">办理退房</div>
                <div class="admin-card-desc">为客人办理退房手续，更新房间状态</div>
            </div>
            <div class="admin-card" onclick="window.location.href='manage-members.html'">
                <div class="admin-card-icon">👤</div>
                <div class="admin-card-title">管理会员</div>
                <div class="admin-card-desc">查看和设置会员等级，管理用户信息</div>
            </div>
            <div class="admin-card" onclick="window.location.href='manage-orders.html'">
                <div class="admin-card-icon">📦</div>
                <div class="admin-card-title">管理订单</div>
                <div class="admin-card-desc">查看和管理所有订单，处理订单相关事务</div>
            </div>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script>
        // 获取管理员名
        document.getElementById('adminName').innerText = sessionStorage.getItem('adminName') || '管理员';
        // 退出登录按钮事件
        $(document).on('click', '#logoutBtn', function() {
            if(confirm('确定要退出登录吗？')) {
                sessionStorage.removeItem('adminName');
                sessionStorage.removeItem('userId');
                window.location.href = 'login.html';
            }
        });
    </script>
</body>
</html> 